#include<iostream>
#include<math.h>
using std::endl;
using std::cout;
using std::string;

class Point{
public:
    virtual void print()const = 0;
protected:
    Point(int x,int y)
    :_x(x)
    ,_y(y)
    {}
private:
    int _x;
    int _y;
};

class Point3D
:public Point
{
public:
    Point3D(int x,int y,int z)
    :Point(x,y)
    ,_z(z){}
private:
    int _z;
};